import { get, post } from "utils/fetch";

// 获取当前用户的未读消息数
export const getUnRead = data => {
  return get("/app/portal/unRead", data);
};
// /app/portal/top
// 热门搜索
export const getHotSearch = data => {
  return get(`/app/outer/portal/top`, data);
};

// /app/portal/recommend
// 智能推荐
export const getRecommend = data => {
  return get("/app/outer/portal/recommend", data);
};

// /app/outer/nls/getToken
// 获取语音识别token信息
export const getToken = data => {
  return get("/app/outer/nls/getToken", data);
};

// // /app/robot/nls/recognize
// // 语音识别
// export const uploadAudio = data => {
//   return request("post", `/app/robot/nls/recognize`, data, {
//     header: {
//       "Content-Type": "multipart/form-data",
//     },
//     isFile: true,
//   });
// };

// /app/outer/portal/searchNews
// APP首页资讯查询
export const searchNews = data => {
  return post("/app/outer/portal/searchNews", data);
};
// /app/outer/portal/searchService
// APP首页服务查询
export const searchService = data => {
  return post("/app/outer/portal/searchService", data);
};

// /app/outer/portal/participle
// 获取分词接口
export const getParticiple = data => {
  return get("/app/outer/portal/participle", data);
};
